{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "</img\n",
      "[Tag(start_tag='<img>', content='./pc/app-auto-coder/src', end_tag='</img')]\n",
      "[]\n"
     ]
    }
   ],
   "source": [
    "from autocoder.common.command_completer import CommandTextParser\n",
    "\n",
    "new_text = \"  <img>./pc/app-auto-coder/src</img\"\n",
    "parser = CommandTextParser(new_text, \"/coding\")\n",
    "parser.coding()\n",
    "current_word = parser.current_word()\n",
    "tags = parser.tags\n",
    "print(current_word)\n",
    "print(tags)\n",
    "print(parser.sub_commands)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'/home'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import os\n",
    "os.path.dirname(\"/home/\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "byzerllm",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
